@isTest private class DiscussionImagesControllerTest
{
    static testMethod void myUnitTest() 
    {
        try
        {
            GenerateEnvironmentTest.gen();
            Test.startTest();

            System.currentPageReference().getParameters().put('id', GenerateEnvironmentTest.newDiscussionForum.Id);
  			DiscussionImagesController iC = new DiscussionImagesController();
  			
  			iC.setIdDiscussion( GenerateEnvironmentTest.newDiscussionForum.Id );
  			
  			Attachment attach = new Attachment(Name = 'test',  Body = Blob.valueOf('Content'),  ParentId = GenerateEnvironmentTest.newDiscussionProfile.Id );
            //insert attach;
  			iC.setNewAttach( attach );
  			
  			iC.saveNewImage();
  			
  			// Getters
  			iC.getDelConfirm();
  			iC.getimgInUse();
  			iC.getDiscussion ();
  			iC.getValidAttSize();
  			iC.getNewAttach();
  			iC.getAttachCount();
  			iC.getAttachments();

  			Attachment attach2 = new Attachment(Name = 'test',  Body = Blob.valueOf('Content'),  ParentId = GenerateEnvironmentTest.newDiscussionProfile.Id );
            insert attach2;  			
            System.currentPageReference().getParameters().put('imageId', attach2.Id );
  			iC.deleteImage();
  
  			DiscussionImagesController.AttachmentInfo iCI = new DiscussionImagesController.AttachmentInfo();
            iCI.setId( attach.Id );
            iCI.getId();
            iCI.setName(attach.Name);
            iCI.getName();
            iCI.setAttachImage( attach.Name );
            iCI.getAttachImage();
            iCI.setIsAvatar( true );
            iCI.getIsAvatar();
            iCI.setPos( 10 );
            iCI.getPos();

            Test.stopTest();
        }
        catch(Exception e)
        {
            throw e;
        }
    }
}